package com.ww.orm.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * @author sunnannan
 * @version 1.0
 * @date 2020/11/23 2:21 下午
 */
@Entity
@Table(name = "act_ru_task", schema = "aceace", catalog = "")
public class ActRuTaskEntity {
    private String id;
    private Integer rev;
    private String name;
    private String parentTaskId;
    private String description;
    private String taskDefKey;
    private String owner;
    private String assignee;
    private String delegation;
    private Integer priority;
    private Timestamp createTime;
    private Timestamp dueDate;
    private String category;
    private Integer suspensionState;
    private String tenantId;
    private String formKey;

    @Id
    @Column(name = "ID_")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "REV_")
    public Integer getRev() {
        return rev;
    }

    public void setRev(Integer rev) {
        this.rev = rev;
    }

    @Basic
    @Column(name = "NAME_")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "PARENT_TASK_ID_")
    public String getParentTaskId() {
        return parentTaskId;
    }

    public void setParentTaskId(String parentTaskId) {
        this.parentTaskId = parentTaskId;
    }

    @Basic
    @Column(name = "DESCRIPTION_")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Basic
    @Column(name = "TASK_DEF_KEY_")
    public String getTaskDefKey() {
        return taskDefKey;
    }

    public void setTaskDefKey(String taskDefKey) {
        this.taskDefKey = taskDefKey;
    }

    @Basic
    @Column(name = "OWNER_")
    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    @Basic
    @Column(name = "ASSIGNEE_")
    public String getAssignee() {
        return assignee;
    }

    public void setAssignee(String assignee) {
        this.assignee = assignee;
    }

    @Basic
    @Column(name = "DELEGATION_")
    public String getDelegation() {
        return delegation;
    }

    public void setDelegation(String delegation) {
        this.delegation = delegation;
    }

    @Basic
    @Column(name = "PRIORITY_")
    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    @Basic
    @Column(name = "CREATE_TIME_")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "DUE_DATE_")
    public Timestamp getDueDate() {
        return dueDate;
    }

    public void setDueDate(Timestamp dueDate) {
        this.dueDate = dueDate;
    }

    @Basic
    @Column(name = "CATEGORY_")
    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Basic
    @Column(name = "SUSPENSION_STATE_")
    public Integer getSuspensionState() {
        return suspensionState;
    }

    public void setSuspensionState(Integer suspensionState) {
        this.suspensionState = suspensionState;
    }

    @Basic
    @Column(name = "TENANT_ID_")
    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Basic
    @Column(name = "FORM_KEY_")
    public String getFormKey() {
        return formKey;
    }

    public void setFormKey(String formKey) {
        this.formKey = formKey;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ActRuTaskEntity that = (ActRuTaskEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(rev, that.rev) &&
                Objects.equals(name, that.name) &&
                Objects.equals(parentTaskId, that.parentTaskId) &&
                Objects.equals(description, that.description) &&
                Objects.equals(taskDefKey, that.taskDefKey) &&
                Objects.equals(owner, that.owner) &&
                Objects.equals(assignee, that.assignee) &&
                Objects.equals(delegation, that.delegation) &&
                Objects.equals(priority, that.priority) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(dueDate, that.dueDate) &&
                Objects.equals(category, that.category) &&
                Objects.equals(suspensionState, that.suspensionState) &&
                Objects.equals(tenantId, that.tenantId) &&
                Objects.equals(formKey, that.formKey);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, rev, name, parentTaskId, description, taskDefKey, owner, assignee, delegation, priority, createTime, dueDate, category, suspensionState, tenantId, formKey);
    }
}
